<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>v-text&v-html</title>
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>v-text&v-html实例</h1>
    <hr>
    <div id="app">
        <span>{{message}}</span>=<span v-text="message"></span><br>
        <span v-html="dodo"></span><!--不推荐使用会被xss攻击-->
    </div>

    <script type="text/javascript">
        var app = new Vue({
            el:'#app',
            data:{
                message:'hello world!',
                dodo:'<h2>hello world!</h2>'
            }

        })
    </script>
</body>
</html>